<?php
namespace Admin\Model;
use Think\Model;
class MenuModel extends Model{

   protected $_validate = array(
     array('parent_id','require','请选择父菜单！'),
     array('name','require','菜单名称必须！')
   );

   protected $_auto = array ( 
        array('create_time','getTime',1,'function') // 对update_time字段在更新的时候写入当前时间戳
    );
}